<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="description" content="">
		<meta name="author" content="">
		<title>个人资料</title>
		<link rel="stylesheet" href="../../css/base.css" />
		<link rel="stylesheet" href="../../css/common.css" />
		<!-- Bootstrap Core CSS -->
		<link href="../../sbadmin/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
		<!-- MetisMenu CSS -->
		<link href="../../sbadmin/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">
		<!-- DataTables CSS -->
		<link href="../../sbadmin/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">
		<!-- Custom CSS -->
		<link href="../../sbadmin/dist/css/sb-admin-2.css" rel="stylesheet">
		<!-- Custom Fonts -->
		<link href="../../sbadmin/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->
		<style>
			body {
				padding: 0 15px !important;
			}
			
			.wo-form-itemcc {
				width: 200px;
			}
		</style>
	</head>

	<body style="background:#FFF;">
		<div class="comm-tt-font pr">
			会员信息 > 会员详情
		</div>
		<div class="zl-ccbox">
			<div class="zl-cctt">
				<ul class="zl-list-ul clb">
					<li>
						<a href="personalMsg.html" class="cur">个人资料</a>
					</li>
					<li>
						<a href="babyMsg.html" id="bbBtn">宝宝资料</a>
					</li>
					<li>
						<a href="order.html" id="orderBtn">订单</a>
					</li>
				</ul>
			</div>
			<div class="zl-cccc pr">
				<a href="editPersonalMsg.html" class="pm-edit-btn">修改会员资料</a>
				<div class="wop-name" id="pmName">李蕾</div>
				<div class="wo-form-item clb">
					<div class="fl">
						<div class="wo-form-itemtt fl">会员编号：</div>
						<div class="wo-form-itemcc fl" id="pmId"></div>
					</div>
					<div class="fl">
						<div class="wo-form-itemtt fl">手机号：</div>
						<div class="wo-form-itemcc fl" id="pmTel"></div>
					</div>
				</div>
				<div class="wo-form-item clb">
					<div class="fl">
						<div class="wo-form-itemtt fl">身份证：</div>
						<div class="wo-form-itemcc fl" id="pmIcard"></div>
					</div>
					<div class="fl">
						<div class="wo-form-itemtt fl">电子邮件：</div>
						<div class="wo-form-itemcc fl" id="pmMail"></div>
					</div>
				</div>
				<div class="wo-form-item clb">
					<div class="fl">
						<div class="wo-form-itemtt fl">生日：</div>
						<div class="wo-form-itemcc fl" id="pmBir"></div>
					</div>
					<div class="fl">
						<div class="wo-form-itemtt fl">通讯地址：</div>
						<div class="wo-form-itemcc fl" style="width: 300px;overflow: hidden;text-overflow: ellipsis;" id="pmAddr"></div>
					</div>
				</div>
				<div class="wo-form-item clb">
					<div class="fl">
						<div class="wo-form-itemtt fl">性别：</div>
						<div class="wo-form-itemcc fl" id="pmSex"></div>
					</div>
					<div class="fl">
						<div class="wo-form-itemtt fl">注册日期：</div>
						<div class="wo-form-itemcc fl" id="pmDate"></div>
					</div>
				</div>
			</div>
		</div>

		<!-- jQuery -->
		<script src="../../sbadmin/bower_components/jquery/dist/jquery.min.js"></script>
		<!-- Bootstrap Core JavaScript -->
		<script src="../../sbadmin/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
		<!-- Metis Menu Plugin JavaScript -->
		<script src="../../sbadmin/bower_components/metisMenu/dist/metisMenu.min.js"></script>
		<!-- DataTables JavaScript -->
		<script src="../../sbadmin/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
		<script src="../../sbadmin/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>
		<!-- Custom Theme JavaScript -->
		<script src="../../sbadmin/dist/js/sb-admin-2.js"></script>
		<script src="../../js/layer/layer.js"></script><br />
		<script src="../../js/common.js"></script>
		<!-- Page-Level Demo Scripts - Tables - Use for reference -->
	</body>
	<script>
		var isType = localStorage.getItem("isType");
		if(isType != "1") {
			$(".pm-edit-btn").hide();
		}
		var id = localStorage.getItem("id", id);
		var user = {
			"id": id
		}
		var localTel = "";
		$.ajax({
			url: "https://order.wz1996.wang/wzbg/user/query/customer",
			type: 'post',
			contentType: 'application/json',
			data: JSON.stringify(user),
			beforeSend: function(request) {
				request.setRequestHeader("token", localStorage.getItem("token"));
			},
			success: function(data) {
				console.log(data);
				if(data.code == "1") {
					$("#pmName").html(data.data[0].name);
					$("#pmId").html(data.data[0].id);
					$("#pmTel").html(data.data[0].phone);
					$("#pmIcard").html(data.data[0].identityCard);
					$("#pmMail").html(data.data[0].email);
					if(data.data[0].birthday == "" || data.data[0].birthday == null || data.data[0].birthday == undefined) {

					} else {
						$("#pmBir").html(data.data[0].birthday.split(" ")[0]);
					}
					$("#pmAddr").html(data.data[0].address);
					localTel = data.data[0].phone;
					if(data.data[0].sex == "1") {
						$("#pmSex").html("男");
					} else if(data.data[0].sex == "0") {
						$("#pmSex").html("女");
					} else {
						$("#pmSex").html("");
					}
					$("#pmDate").html(data.data[0].createTime);
				} else if(data.code == "-1") {
					layar(data.msg);
					setTimeout("window.parent.frames.location.href='/xcxadmin/login.html'", 1000)
				} else {
					layar(data.msg);
				}
			},
			error: function(e) {
				errcode(e);
			}
		});

		$("#orderBtn,#bbBtn").click(function() {
			localStorage.setItem("localTel", localTel);
		})
	</script>

</html>